<?php
namespace app\models;

use yii;
use yii\db\Query;

class Broadcast_group
{
    private $table;

    public function __construct()
    {
        $this->table = yii::$app->db->tablePrefix.'broadcast_group';
    }

    /**
     * 插入广播分组
     * @return bool
     */
    public function insert($data)
    {
        return yii::$app->db->createCommand()->insert($this->table,$data)->execute();
    }

    public function get_group()
    {
        $db = new Query();
        return $db->select('*')->from($this->table)->all();
    }

}